package com.qf.qfleadnewsfeignapi.wemedia;

import com.qf.qfleadnewsmodel.wemedia.pojos.WmNews;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;


@FeignClient(value = "leadnews-wemedia")
public interface WeMediaApi {

    @GetMapping("/wemedia/api/wmnews/{id}")
    WmNews findWmNewsById(@PathVariable("id") Integer id);

    @GetMapping("/wemedia/api/wmuser/{id}")
    String findUsernameById(@PathVariable("id") Integer id);

    @GetMapping("/wemedia/api/wmchannel/{id}")
    String findChannelnameById(@PathVariable("id") Integer id);

    @GetMapping("/wemedia/api/wmnews/{id}/{articleId}")
    void updateWmnewsStatusById(@PathVariable("id") Integer id,@PathVariable("articleId") Long articleId);

    @GetMapping("/wemedia/api/channelIds")
    List<Integer> getChannelIds();
}
